<template>
    <div class="home-box">这里是首页-home</div>
    <div class="home-box">
        <TodoList/>
    </div>
    <div class="home-box">
        <h5>循环请求问题：用for循环处理多个接口同步调用</h5>
        <a-button @click="handleReq">点击请求</a-button>
    </div>
    
    <div class="home-box">
        <h5>promise中错误捕获</h5>
        <a-button danger @click="handleErr">点击报错</a-button>
    </div>
    <div class="home-box">
        <h5>共用同一个全局store，数据同步发生变化</h5>
        <span>使用vuex中的store 参考路径：src/store/index copy.ts</span>
        <!-- <CountStore ></CountStore> -->
        <!-- <CountStore2 ></CountStore2> -->
    </div>
</template>
<script lang="ts" setup>
import TodoList from '../components/TodoList.jsx'
// import CountStore from '../components/CountStore.vue'
// import CountStore2 from '../components/CountStore2.vue'
import { handleReq } from '../utils/reqList'
import { handleErr } from '../utils/reqErr'
import '../utils/TsDemo'
interface Props {
  idName: number | "";
}

const props = defineProps<Props>();
console.log(props);
</script>
<style lang="scss" scoped>
$bg: #eee;
.home-box {
  padding: 30px;
  border-bottom: 1px solid #eee;
  margin-bottom: 10px;
  background: $bg;
}
h5 {
  color: #000 !important;
  font-weight: bold !important;
}
h3 {
  width: auto;
}
</style>
